import Vue from 'vue'
import Vuex from 'vuex'
// import { ssoService , clientService } from '@/api'
import storage from '@/utils/storage'
import CONFIG from '@/config/config'
import mutations from './mutations'
import actions from './action'
import getters from './getters'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user: JSON.parse(storage.getItem(CONFIG.USERINFO) || null),
    roles: [],
    routers: [],
    addRouters: [],
  },
  getters,
  mutations,
  actions,
})
